<template>
  <div>
    <h2>帅哥美女走一走</h2>
    <ul>
      <li v-for="(item, i) in arr" :key="i">{{ item }}</li>
    </ul>
    <button @click="btn">走一走</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["帅哥", "美女", "程序猿"],
    };
  },
  methods: {
    btn() {
      this.arr.push(this.arr[0]);
      this.arr.shift();
    },
  },
};
</script>

<style>
</style>